<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="css/adminstyle.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="css/common.css" type="text/css" />
<title>管理区域</title>
<script language="javascript" type="text/javascript" src="My97DatePicker/WdatePicker.js"></script>
<link href="css/ui-lightness/jquery-ui-1.10.3.custom.min.css" rel="stylesheet" type="text/css">
<script  language="javascript" type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
<script   language="javascript" type="text/javascript"src="js/jquery-ui-1.10.3.custom.js"></script>
</head>
<script>
$(function() {		
	$( "#tabs" ).tabs();
});
</script>
<body>
<div id="tabs">
	<ul>
    <li><a href="#tabs-3">操作记录</a></li>
		<li><a href="#tabs-1">订单信息</a></li>
		<li><a href="#tabs-4">产品信息</a></li>
		<li><a href="#tabs-2">支付信息</a></li>

        
</ul>
 <div id="man_zone">
<div style="background-color:#FFFFFF ">
<div id="tabs-1">
<table width="99%" border="0" align="center"  cellpadding="3" cellspacing="1" class="tableborder">
          <tr  class="header">
          <td colspan="4" >订单信息</td>
        </tr>  
    <tr>
      <td class="left_title_2" width="10%">订单编号 </td>
      <td  width="40%" bgcolor="#FFFFFF"><?=$order_no?></td>
      <td  align="left" class="left_title_2" width="10%">订单日期</td>
      <td bgcolor="#FFFFFF"><?=date('Y-m-d H:i:s',$add_time)?></td>
      </tr>
            <tr>
      <td class="left_title_2" width="10%">订单金额</td>
      <td  width="40%" bgcolor="#FFFFFF"><?=$order_amount?></td>
      <td  align="left" class="left_title_2">订单状态</td>
      <td bgcolor="#FFFFFF"><?=$order_status_name?></td>
      </tr>
     
            <tr>
      <td class="left_title_2" width="10%">电话</td>
      <td  width="40%" bgcolor="#FFFFFF"><?=$user['phone']?></td>
      <td  align="left" class="left_title_2" width="10%">邮箱</td>
      <td bgcolor="#FFFFFF"><?=$user['email']?></td>
      </tr>
              <tr>
      <td class="left_title_2" width="10%">英文名</td>
      <td  width="40%" bgcolor="#FFFFFF"><?=$user['english_name']?></td>
      <td  align="left" class="left_title_2">负责人</td>
      <td bgcolor="#FFFFFF"><?=$user['employees']?></td>
      </tr>
              <tr>
      <td class="left_title_2" width="10%">QQ</td>
      <td  width="40%" bgcolor="#FFFFFF"><?=$user['qq']?></td>
      <td  align="left" class="left_title_2">SKYPE</td>
      <td bgcolor="#FFFFFF"><?=$user['skype_id']?></td>
      </tr>
      </table>
    </div>
<div id="tabs-4">
<table width="99%" border="0" align="center"  cellpadding="3" cellspacing="1" class="tableborder">
      <tr  class="header">
	      <td width="20%" >产品编号</td>
	      <td width="20%" >产品名称</td>
	      <td width="20%" >产品价格</td>
	      <td width="20%" >产品折扣</td>
      </tr>
      <?
      foreach($productList  as $v){
	  ?>
      <tr bgcolor="#FFFFFF">
	      <td ><?=$v['serial_number']?></td>
	      <td><?=$v['name']?></td>
	      <td><?=$v['price']?></td>
	      <td><?=$v['discount']?></td>
      </tr>
      <?
	  }
	  ?>
      </table>
    </div>
<div id="tabs-2">
<table width="99%" border="0" align="center"  cellpadding="3" cellspacing="1" class="tableborder">
     <tr  class="header">
          <td colspan="6" >支付信息</td>
     </tr> 
     <tr>
      <td class="left_title_2" >支付时间</td>
      <td bgcolor="#FFFFFF"><?=$pay_time?></td>
      <td class="left_title_2" >支付状态</td>
      <td bgcolor="#FFFFFF"><?=$pay_status?></td>
      <td class="left_title_2">支付类型</td>
      <td bgcolor="#FFFFFF"><?=$pay_type?></td>
      </tr>
     <tr  bgcolor="#FFFFFF">
          <td colspan="6" >&nbsp;</td>
     </tr> 
     <tr  bgcolor="#FFFFFF">
          <td colspan="6" >应付信息</td>
     </tr> 
     <tr class="left_title_2">
          <td width="18%" align="center">产品金额</td>
          <td width="18%" align="center">产品折扣</td>
          <td width="15%" align="center">优惠券</td>
          <td width="15%" align="center">余额支付</td>
          <td width="15%" align="center">在线支付</td>
          <td width="20%" align="center">应付金额</td>
     </tr> 
     <tr bgcolor="#FFFFFF">
          <td align="right"><?=$order_amount?></td>
          <td align="right"><?=$discount_money?></td>
          <td align="right"><?=$ticket_money?></td>
          <td align="right"><?=$user_money?></td>
          <td align="right"><?=$online_money?></td>
          <td align="right"><?=$order_amount-$user_money-$discount_money-$ticket_money-$online_money?></td>
     </tr> 
</table>
</div>

<div id="tabs-3">
  <form method="post" id="form" action="" >
  <input name="id" type="hidden" value="<?=$id?>" />
 <table width="96%" border="0" cellpadding="3" cellspacing="1" class="tableborder" align="center">
          <tr  class="header">
          <td colspan="4" >操作</td>
        </tr>        
	<tr bgcolor="#FFFFFF">
          <td colspan="1" >备注</td>
          <td colspan="7" ><textarea name="remark" id="textfield" cols="100" rows="5"></textarea></td>		
		</tr>	
		<tr>
		<td colspan="8" bgcolor="#FFFFFF">&nbsp;</td>
		</tr>
		<tr bgcolor="#FFFFFF">
          <td style="font-weight:bold;width:15%;" align="center">订单状态</td>
		  <td style="width:10%;"><?=getStr($extract_vars,'order_status_name')?></td>
		  <td style="font-weight:bold;" align="center">操作信息</td>
		  <td style="width:15%;">
		  <? if (getStr($extract_vars,'order_status')==ORDER_STATUS_0){?>
		  <?=getStr($extract_vars,'add_user')?>&nbsp;&nbsp;创建于
		  <?=date('Y-m-d H:i:s',$add_time)?>
		  <? }?>
		  <? if (getStr($extract_vars,'order_status')==CLASS_STATUS_1){?>
		  <?=getStr($extract_vars,'confirm_admin')?>&nbsp;&nbsp;确认于
		  <?=date('Y-m-d H:i:s',getStr($extract_vars,'confirm_time'))?>
		  <?}?>
		  <?if (getStr($extract_vars,'order_status')==CLASS_STATUS_2){?>
		  <?=getStr($extract_vars,'complete_admin')?>&nbsp;&nbsp;完成于
		  <?=date('Y-m-d H:i:s',getStr($extract_vars,'complete_time'))?>
		  <?}?>
		  <?if (getStr($extract_vars,'order_status')==CLASS_STATUS_3){?>
		  <?=getStr($extract_vars,'cancel_admin')?>&nbsp;&nbsp;取消于
		  <?=date('Y-m-d H:i:s',getStr($extract_vars,'cancel_time'))?>
		  <?}?>
		  </td>
		</tr>
		<tr>
		<td colspan="8" bgcolor="#FFFFFF">&nbsp;</td>
		</tr>
		<tr   bgcolor="#FFFFFF">
          <td colspan="4" >
	       <input name="id" type="hidden" value="<?=getStr($extract_vars,'id')?>" />
       	    <input name="" type="button" value="返回" class="PublicBot" onclick="location.href='order_lists.html'" />
	       <?if (getStr($extract_vars, 'order_status')==ORDER_STATUS_0){?>
	       <input name="" type="button" value="保存" class="PublicBot" onclick="subs('order_saveRemark.html')" />
          	<input name="" type="button" value="确认" class="PublicBot" onclick="subs('order_confirm.html')" />
          	 <input name="" type="button" class="PublicBot" value="取消"  onclick="subs('order_cancellation.html')" />
           <?}?>
           <?if (getStr($extract_vars, 'order_status')==ORDER_STATUS_1){?>
	        <input name="" type="button" value="保存" class="PublicBot" onclick="subs('order_saveRemark.html')" />
           	<input name="" type="button" class="PublicBot" value="完成"  onclick="subs('order_complete.html')" />
            <input name="" type="button" class="PublicBot" value="取消"  onclick="subs('order_cancellation.html')" />
           <?}?>
          </td>
        </tr>
		<tr  bgcolor="#FFFFFF">
   		<td style="width:15%" >操作类型</td>
   		<td style="width:15%" >操作用户</td>
   		<td style="width:15%" >操作时间</td>
   		<td style="width:55%" >备注</td>
  	  </tr>      
     <?
     foreach($log as $v){
	 ?>
	<tr  bgcolor="#FFFFFF">
		    <td ><?=getStr($book_log_type, $v['type'])?></td>
		    <td ><?=$v['add_admin']?></td>
		    <td ><?=date('Y-m-d H:i:s',$v['add_time'])?></td>
		    <td ><?=$v['remark']?></td>
		  </tr>
      <?
	 }
	  ?>
      </table>
</form>      
    </div>
</div>
</div>
</div>
<script>
function subs(action){
	document.getElementById('form').action=action;
	document.getElementById('form').submit();
}
</script>
</body>
</html>
